package com.example.springboot_jap_model.dao;

import com.example.springboot_jap_model.domain.Authority;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface AuthorityDao extends JpaRepository<Authority, Long> {

    Authority findFirstByUrl(String url);

    List<Authority> findByUrl(String url);

    List<Authority> findByIdIn(Long[] longs);

    List<Authority> findAllByParentsIdIsNull();

    List<Authority> findAllByParentsIdIsNotNull();

    List<Authority> findAllByParentsId(Long parentsId);

    List<Authority> findByLevel(Integer level);
}
